home *** CD-ROM | disk | FTP | other *** search
/ Mac-Source 1994 July / Mac-Source_July_1994.iso / Other Langs / MacPerl ƒ / Perl Source ƒ / MacPerl / Demo / PlainPerl < prev    next >
Text File  |  1993-10-11  |  611b  |  34 lines

  1. #!/usr/bin/perl
  2.  
  3. print "Hi testers, I'm the first Perl program running under the\n";
  4. print "new standalone Perl.\n";
  5. print "Do you like me ? ";
  6.  
  7. $_ = <>;
  8.  
  9. unless (/yes/i || /yeah/i || /yup/i || /sure/i) {
  10.     print "I'm sorry to hear that!\n";
  11.     die;
  12. }
  13.  
  14. open (OTHER, ">Dev:Console:I Can Do Multiple Windows Now!") || die;
  15.  
  16. print OTHER "This one is read only\n";
  17.  
  18.  
  19. open (THIRD, "+>Dev:Console:As many as you like!") || die;
  20.  
  21. print THIRD "This one is read/write\n";
  22.  
  23. print THIRD "Now how do you like that?? ";
  24.  
  25. $_ = <THIRD>;
  26.  
  27. chop;
  28.  
  29. print "You said \"$_\"? I thought you would.\n";
  30.  
  31. print "Bye\n";
  32.  
  33. &MacPerl'Quit(1);
  34.